package main.java.FSMDE.controllers;

import java.util.Collection;
import java.util.Iterator;
import java.util.List;

import javax.xml.parsers.ParserConfigurationException;

import main.java.FSMDE.controllers.listeners.IDiagramEventListener;
import main.java.FSMDE.controllers.listeners.IInterfaceEventListener;
import main.java.FSMDE.controllers.listeners.ITransitionEventListener;
import main.java.FSMDE.models.Diagram;
import main.java.FSMDE.models.Interface;
import main.java.FSMDE.models.Transition;
import main.java.FSMDE.views.IDiagramView;

import com.mxgraph.model.mxCell;
import com.mxgraph.view.mxGraph;


public interface IDiagramController extends IInterfaceEventListener,
		ITransitionEventListener {

	void createSubDiagram(String diagramName, String interfaceChosen);

	void addListener(IDiagramEventListener iDiagramEventListener);

	mxGraph getGraph();

	Diagram getDiagram();

	void createInterface();

	void createTransition();

	void addInterface(double x, double y) throws Exception;

	void addTransition(double x, double y) throws Exception;

	mxCell getInterfaceCell(String id);

	boolean hasPendingInterface();

	boolean hasPendingTransition();

	void save() throws ParserConfigurationException;

	IDiagramView getView();

	void load(Diagram diagram);

	void updateInterface(Interface interface0);

	void updateTransition(Transition transition);

	Iterable<Interface> getAvailableInterfaces();

	boolean deleteInterface(Interface intterface0);

	boolean deleteTransition(Transition transition);

	void validate();

	void toggleLegend();

	int getInterfacesCount();

	void addErmDiagrams(List<main.java.ERMDE.models.Diagram> diagrams);

	void refreshComponents();

	Collection<mxCell> getAllInterfaceCells();

	Iterator<IDiagramEventListener> getListeners();

	main.java.FSMDE.models.Diagram getSubDiagram(String relatedSubdiagramName);

	int getInterfacesAvailableForSubdiagramCount();

	boolean canDoZoomIn();

	void didZoomIn();

	boolean canDoZoomOut();

	void didZoomOut();

	String getDataDirectory();

	void hideLegend();

	void removeListener();
}
